import request from '@/utils/request'

export function getProductList() {
	return request({
		url: '/product/getProductList',
		method: 'get'
	})
}
export function getProductType() {
	return request({
		url: '/product/selectAllProductType',
		method: 'get'
	})
}
export function getAgentList() {
	return request({
		url: '/product/selectDefaultDistribution',
		method: 'get'
	})
}
export function addProduct(params) {
	return request({
		url: '/product/generateProduct',
		method: 'post',
		data: params
	})
}
export function takeOffProduct(params) {
	return request({
		url: '/product/modifyProductStatus',
		method: 'put',
		data: params
	})
}
export function getProductInfo(params) {
	return request({
		url: '/product/findProductById',
		method: 'get',
		params: params
	})
}
export function modifyProduct(params) {
	return request({
		url: '/product/modifyProduct',
		method: 'put',
		data: params
	})
}
export function getProductDetail(params) {
	return request({
		url: '/product/productDetail',
		method: 'get',
		params: params
	})
}

// 产品预订-获取代理商列表
export function getDistributor(params) {
	return request({
		url: '/product/assignDistributionByProductId',
		method: 'get',
		params: params
	})
}

// 代下订单
export function generateOrder(params) {
	return request({
		url: '/product/generatorOrder',
		method: 'post',
		data: params
	})
}


